extends Control


@onready var tank_type_list: GridContainer = $TankTypeList

var tank_type_tscn := preload("res://entity/ui/tank_type.tscn")


const TANK_TYPE_DATA: Array = [
	{
		"name": "轻型坦克",
		"damage": 1.0,
		"speed": 250.0,
		"shell_speed": 500.0,
		"fire_rate": 2.0,
		"health": 1.0,
	},
	{
		"name": "中型坦克",
		"damage": 1.5,
		"speed": 200.0,
		"shell_speed": 500.0,
		"fire_rate": 1.0,
		"health": 2.0,
	},
	{
		"name": "重型坦克",
		"damage": 2.0,
		"speed": 150.0,
		"shell_speed": 300.0,
		"fire_rate": 0.5,
		"health": 3.0,
	},
]

func _ready() -> void:
	for i in TANK_TYPE_DATA:
		var t := tank_type_tscn.instantiate()
		t.data = i
		tank_type_list.add_child(t)









